﻿@model IEnumerable<KhuyenMaiVang.DAL.Customer>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutDetail.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Phone
        </th>
        <th>
            HouseNumber
        </th>
        <th>
            Street
        </th>
        <th>
            Ward
        </th>
        <th>
            District
        </th>
        <th>
            City
        </th>
        <th>
            Note
        </th>
        <th>
            User
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Phone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.HouseNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Street)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Ward)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.District)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.City)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Note)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User.Username)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
